home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / JTabbedPane$Page.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  5.4 KB  |  217 lines

  1. package javax.swing;
  2.  
  3. import java.awt.Color;
  4. import java.awt.Component;
  5. import java.awt.Cursor;
  6. import java.awt.Dimension;
  7. import java.awt.Font;
  8. import java.awt.FontMetrics;
  9. import java.awt.Point;
  10. import java.awt.Rectangle;
  11. import java.awt.event.FocusListener;
  12. import java.io.Serializable;
  13. import java.util.Locale;
  14. import javax.accessibility.Accessible;
  15. import javax.accessibility.AccessibleComponent;
  16. import javax.accessibility.AccessibleContext;
  17. import javax.accessibility.AccessibleRole;
  18. import javax.accessibility.AccessibleState;
  19. import javax.accessibility.AccessibleStateSet;
  20.  
  21. class JTabbedPane$Page extends AccessibleContext implements Serializable, Accessible, AccessibleComponent {
  22.    // $FF: synthetic field
  23.    private final JTabbedPane this$0;
  24.    String title;
  25.    Color background;
  26.    Color foreground;
  27.    Icon icon;
  28.    Icon disabledIcon;
  29.    JTabbedPane parent;
  30.    Component component;
  31.    String tip;
  32.    boolean enabled;
  33.    boolean needsUIUpdate;
  34.  
  35.    JTabbedPane$Page(JTabbedPane var1, JTabbedPane var2, String var3, Icon var4, Icon var5, Component var6, String var7) {
  36.       this.this$0 = var1;
  37.       this.enabled = true;
  38.       this.title = var3;
  39.       this.icon = var4;
  40.       this.disabledIcon = var5;
  41.       this.parent = var2;
  42.       ((AccessibleContext)this).setAccessibleParent(var2);
  43.       this.component = var6;
  44.       this.tip = var7;
  45.       if (var6 instanceof Accessible) {
  46.          AccessibleContext var8 = ((Accessible)var6).getAccessibleContext();
  47.          if (var8 != null) {
  48.             var8.setAccessibleParent(this);
  49.          }
  50.       }
  51.  
  52.    }
  53.  
  54.    public void addFocusListener(FocusListener var1) {
  55.    }
  56.  
  57.    public boolean contains(Point var1) {
  58.       Rectangle var2 = this.getBounds();
  59.       return var2.contains(var1);
  60.    }
  61.  
  62.    public Accessible getAccessibleAt(Point var1) {
  63.       return this.component instanceof Accessible ? (Accessible)this.component : null;
  64.    }
  65.  
  66.    public Accessible getAccessibleChild(int var1) {
  67.       return this.component instanceof Accessible ? (Accessible)this.component : null;
  68.    }
  69.  
  70.    public int getAccessibleChildrenCount() {
  71.       return this.component instanceof Accessible ? 1 : 0;
  72.    }
  73.  
  74.    public AccessibleComponent getAccessibleComponent() {
  75.       return this;
  76.    }
  77.  
  78.    public AccessibleContext getAccessibleContext() {
  79.       return this;
  80.    }
  81.  
  82.    public String getAccessibleDescription() {
  83.       if (super.accessibleDescription != null) {
  84.          return super.accessibleDescription;
  85.       } else {
  86.          return this.tip != null ? this.tip : null;
  87.       }
  88.    }
  89.  
  90.    public int getAccessibleIndexInParent() {
  91.       return this.parent.indexOfTab(this.title);
  92.    }
  93.  
  94.    public String getAccessibleName() {
  95.       if (super.accessibleName != null) {
  96.          return super.accessibleName;
  97.       } else {
  98.          return this.title != null ? this.title : null;
  99.       }
  100.    }
  101.  
  102.    public AccessibleRole getAccessibleRole() {
  103.       return AccessibleRole.PAGE_TAB;
  104.    }
  105.  
  106.    public AccessibleStateSet getAccessibleStateSet() {
  107.       AccessibleStateSet var1 = this.parent.getAccessibleContext().getAccessibleStateSet();
  108.       var1.add(AccessibleState.SELECTABLE);
  109.       int var2 = this.parent.indexOfTab(this.title);
  110.       if (var2 == this.parent.getSelectedIndex()) {
  111.          var1.add(AccessibleState.SELECTED);
  112.       }
  113.  
  114.       return var1;
  115.    }
  116.  
  117.    public Color getBackground() {
  118.       return this.background != null ? this.background : this.parent.getBackground();
  119.    }
  120.  
  121.    public Rectangle getBounds() {
  122.       return this.parent.getUI().getTabBounds(this.parent, this.parent.indexOfTab(this.title));
  123.    }
  124.  
  125.    public Cursor getCursor() {
  126.       return this.parent.getCursor();
  127.    }
  128.  
  129.    public Font getFont() {
  130.       return this.parent.getFont();
  131.    }
  132.  
  133.    public FontMetrics getFontMetrics(Font var1) {
  134.       return this.parent.getFontMetrics(var1);
  135.    }
  136.  
  137.    public Color getForeground() {
  138.       return this.foreground != null ? this.foreground : this.parent.getForeground();
  139.    }
  140.  
  141.    public Locale getLocale() {
  142.       return this.parent.getLocale();
  143.    }
  144.  
  145.    public Point getLocation() {
  146.       Rectangle var1 = this.getBounds();
  147.       return new Point(var1.x, var1.y);
  148.    }
  149.  
  150.    public Point getLocationOnScreen() {
  151.       Point var1 = this.parent.getLocationOnScreen();
  152.       Point var2 = this.getLocation();
  153.       var2.translate(var1.x, var1.y);
  154.       return var2;
  155.    }
  156.  
  157.    public Dimension getSize() {
  158.       Rectangle var1 = this.getBounds();
  159.       return new Dimension(var1.width, var1.height);
  160.    }
  161.  
  162.    public boolean isEnabled() {
  163.       return this.enabled;
  164.    }
  165.  
  166.    public boolean isFocusTraversable() {
  167.       return false;
  168.    }
  169.  
  170.    public boolean isShowing() {
  171.       return this.parent.isShowing();
  172.    }
  173.  
  174.    public boolean isVisible() {
  175.       return this.parent.isVisible();
  176.    }
  177.  
  178.    public void removeFocusListener(FocusListener var1) {
  179.    }
  180.  
  181.    public void requestFocus() {
  182.    }
  183.  
  184.    public void setBackground(Color var1) {
  185.       this.background = var1;
  186.    }
  187.  
  188.    public void setBounds(Rectangle var1) {
  189.    }
  190.  
  191.    public void setCursor(Cursor var1) {
  192.       this.parent.setCursor(var1);
  193.    }
  194.  
  195.    public void setEnabled(boolean var1) {
  196.       this.enabled = var1;
  197.    }
  198.  
  199.    public void setFont(Font var1) {
  200.       this.parent.setFont(var1);
  201.    }
  202.  
  203.    public void setForeground(Color var1) {
  204.       this.foreground = var1;
  205.    }
  206.  
  207.    public void setLocation(Point var1) {
  208.    }
  209.  
  210.    public void setSize(Dimension var1) {
  211.    }
  212.  
  213.    public void setVisible(boolean var1) {
  214.       this.parent.setVisible(var1);
  215.    }
  216. }
  217.